<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:text-align="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="ThemeBucket">
  <link rel="shortcut icon" th:href="@{/#}" type="image/png">

  <title>修改学生页面</title>

  <!--data table-->
  <link rel="stylesheet" th:href="@{/js/data-tables/DT_bootstrap.css}" />

    <!--公共css-->
    <link th:include="common::commonheader">
</head>

<body class="sticky-header">

<section>
    <!-- left side start-->
    <div th:replace="common::leftmenu"></div>
    <!-- left side end-->

    <!-- main content start-->
    <div class="main-content" >

        <!-- 头部分开始-->
        <div th:replace="common::headermenu"></div>
        <!-- header section end-->


        <!-- page heading start-->
        <div class="page-heading">
            <h3>
                可编辑课程页面
            </h3>
            <ul class="breadcrumb">
                <li>
                    <a href="#">Dashboard</a>
                </li>
                <li>
                    <a href="#">Data Table</a>
                </li>
                <li class="active"> 修改课程页面 </li>
            </ul>
        </div>
        <!-- page heading end-->

        <!--body wrapper start-->
        <header class="panel-heading">
            编辑课程信息
        </header>
        <div class="panel-body">
            <form role="form" class="form-horizontal adminex-form" th:object="${course}" method="post" th:action="@{/adminRole/editCourse}">
                <input type="hidden" th:value="*{id}" name="id">

                <div class="form-group has-error">
                    <label class="col-lg-2 control-label">课程名</label>
                    <div class="col-lg-10">
                        <input type="text" name="name" placeholder="请输入姓名" class="form-control" required th:value="*{name}">
<!--                        <p class="help-block">更新成功</p>-->
                    </div>
                </div>
                <div class="form-group has-warning">
                    <label class="col-lg-2 control-label">地址</label>
                    <div class="col-lg-10">
                        <input type="text" name="address" placeholder="请输入课程地址"  class="form-control" th:value="*{address}">
<!--                        <p class="help-block">更新成功</p>-->
                    </div>
                </div>
                <div class="form-group has-warning">
                    <label class="col-lg-2 control-label">学分</label>
                    <div class="col-lg-10">
                        <input type="text"  name="credit" placeholder="请输入年级"  class="form-control" th:value="*{credit}">
<!--                        <p class="help-block">更新成功</p>-->
                    </div>
                </div>
                <div class="form-group has-warning">
                    <label class="col-lg-2 control-label">学期</label>
                    <div class="col-lg-10">
                        <input type="text"  name="term" placeholder="请输入学期"  class="form-control" th:value="*{term}">
                        <!--                        <p class="help-block">更新成功</p>-->
                    </div>
                </div>
                <div class="form-group has-warning">
                    <label class="col-lg-2 control-label">可选人数</label>
                    <div class="col-lg-10">
                        <input type="text"  name="places" placeholder="请输入可选人数"  class="form-control" th:value="*{places}">
                        <!--                        <p class="help-block">更新成功</p>-->
                    </div>
                </div>

                <div class="form-group has-warning">
                    <label class="col-lg-2 control-label">可选年级</label>
                    <div class="col-lg-10">
                        <input type="text"  name="availableGrade" placeholder="请输入可选年级"  class="form-control" th:value="*{availableGrade}">
                        <!--                        <p class="help-block">更新成功</p>-->
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-lg-offset-2 col-lg-10">
                        <button class="btn btn-primary" type="submit">Submit</button>
                    </div>
                </div>
            </form>
        </div>
        <!--body wrapper end-->
        <div class="alert alert-success alert-block fade in" th:unless="${#strings.isEmpty(message)}">
            <button type="button" class="close close-sm" data-dismiss="alert">
                <i class="fa fa-times"></i>
            </button>
            <h4>
                <i class="icon-ok-sign"></i>
                更新失败
            </h4>
            <p th:text="${message}"></p>
        </div>
        <!--footer section start-->
        <footer>
            @Admin & editInfo
        </footer>
        <!--footer section end-->


    </div>
    <!-- main content end-->
</section>

<!-- Placed js at the end of the document so the pages load faster -->
<div th:replace="common::commonscript"/>
<!--data table-->
<script type="text/javascript" th:src="@{/js/data-tables/jquery.dataTables.js}"></script>
<script type="text/javascript" th:src="@{/js/data-tables/DT_bootstrap.js}"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>

<!--script for editable table-->
<script th:src="@{/js/editable-table.js}"></script>

<!-- END JAVASCRIPTS -->
<script>
    jQuery(document).ready(function() {
        EditableTable.init();
    });
    $(".message .close").on('click',function () {
        $(this).closest(".message")
            .transition("fade");
    })
</script>

</body>
</html>
